package cn.cdg.mall.controller;

import cn.cdg.mall.pojo.po.StandardPO;
import cn.cdg.mall.service.StandardService;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@RestController // 声明这是一个控制器, 同时该控制器中所有的方法全部以JSON格式响应数据
@RequestMapping("/standard")
public class StandardController {
    @Autowired
    private StandardService standardService;

    @RequestMapping("/selectAll")
    public List<StandardPO> selectAll() {
        return standardService.selectAll();
    }
}
